package vue;

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.lang.*;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;

import model.Archer;
import model.Case;

public class Grille extends JPanel implements MouseListener {
	
	private West w;
	private int vita, vital;
	private final AffichePrincipalePlateau damier;
	private final JLabel etiquette;

	
	
	public AffichePrincipalePlateau getDamier() {
		return damier;
	}


	public JLabel getEtiquette() {
		
		return etiquette;
	}

	public Grille(West w){
	
		this.w = w;
		this.addMouseListener(this);
		damier=new AffichePrincipalePlateau(8, 8);
		etiquette=new JLabel("Aucune partie en cours");
		
	}
	
	
	public void setVitalite1(int vit) {
		this.vita = vit;
		w.setVitalite1(this.vita);
	}
	public void setVitalite2(int score) {
		this.vital = score;
		w.setVitalite2(this.vital);
	}
	
	public void updateVitalite1(int vi) {
		 this.vita += vi;
		w.setVitalite1(this.vita);
	}
	
	public void updateVitalite2(int vi) {
		this.vital -= vi;
		w.setVitalite2(this.vital);
	}
	
	
	
	public void mouseClicked(MouseEvent arg0) {
		
	}
	public void mouseEntered(MouseEvent arg0) {
		
	}
	public void mouseExited(MouseEvent arg0) {
		
	}

	public void mousePressed(MouseEvent arg0) {	
		
	}

	public void mouseReleased(MouseEvent arg0) {		
	}


	public int getVita() {
		// TODO Auto-generated method stub
		return vital;
	}
	
	

}

